<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
	<link rel="stylesheet" href="__PUBLIC__/Bootstrap/Css/bootstrap.min.css" />
	<link rel="stylesheet" href="__PUBLIC__/Css/common.css" />
	<script type="text/javascript" src='__PUBLIC__/Js/jquery-1.7.2.min.js'></script>
	<style type="text/css">
		body{
			margin-bottom: 100px;
		}
	</style>
</head>
<body>
	<div class="container-fluid">
	<div class="row-fluid">
	<div class="span12">

	<form action="" method='post' name="add">
		<table class='table table-bordered table-hover'>
			<tr>
				<th>货品ID</th>
				<foreach from="$typeData" key="$k" value="$v">
					<th>{$v.taname}</th>
				</foreach>

				<th>库存</th>
				<th>货号</th>
			</tr>
			<!-- 如果已添加数目小于可能情况数目，才出现添加货品的输入框 -->
			<tr class="info add">

				<td>{$oldData.glid}</td>
				<foreach from="$attr_good" key="$k" value="$v">
					<td>		
						<select name="spec[]" style="width:170px">
							<option value="0">-请选择-</option>
							<foreach from="$v" key="$kk" value="$vv">
								
									<option value="{$vv['gaid']}" <foreach from="$attr" key="$k1" value="$v1"><if value="$vv['gaid']==$v1['gaid']">selected</if></foreach>>{$vv['attr']}</option>
								
							</foreach>	
						</select>
					</td>
				</foreach>
				<td>
					<input type="text" name='inventory' value="{$oldData.inventory}" />
				</td>
				<td>
					<input type="text" name='number' value="{$oldData.number}" />
				</td>
			</tr>

		</table>

		<input type="hidden" name='goods_gid' value='{$hd.get.gid}'/>
		<!-- <input type="hidden" name='tid' value='{$Think.get.tid}'/> -->
		<input type="submit" value='保存修改' class="btn btn-primary"/>
	</form>


	</div>
	</div>
	</div>
<script type="text/javascript">
	$(function(){
		$('.edit').click(function() {
			$('.edit_tr').css('display', 'block');
			$('.add').css('display', 'none');
		});
	})
</script>

</body>
</html>